Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 module terraform warnings refactor #302

Merged
merged 14 commits into from
Jan 7, 2025

Conversation

ian-hoyle
Copy link
Contributor

@ian-hoyle ian-hoyle commented Dec 16, 2024

S3 module the resource aws_s3_bucket has attributes logging, lifecycle_rule, cors_rule ,acl andversioning that should be in separate resources. The grants should be defined in the iam policy
Refactoring the grants policy is not as simple as other resource changes. As the tdr-terrafom-module/s3 is to be deprecated a partial solution that covers the only case where canonical-user-grants variable has been used is provided so the warnings will disappear. The code is commented to explain the variable use/limitation

The vpc = true argument used to indicate that the EIP was associated with a VPC, but since AWS introduced this as the default behaviour, the attribute is redundant and has been removed from newer versions of the Terraform AWS Provider.

Copy link
Contributor

@TomJKing TomJKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Added some minor comments. Thanks.

s3/templates/secure_transport.json.tpl Show resolved Hide resolved
s3/variables.tf Outdated Show resolved Hide resolved
s3/templates/secure_transport.json.tpl Outdated Show resolved Hide resolved
s3/main.tf Outdated Show resolved Hide resolved
s3/main.tf Outdated
@@ -55,76 +71,84 @@ resource "aws_s3_bucket_notification" "log_bucket_notification" {
}
depends_on = [aws_s3_bucket_policy.log_bucket]
}

# This module is to be deprecated and caused many terraform warnings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just have a comment to say the module is to be deprecated.

@ian-hoyle ian-hoyle requested a review from TomJKing January 6, 2025 13:23
Copy link
Contributor

@TomJKing TomJKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks

@ian-hoyle ian-hoyle merged commit fa249c1 into master Jan 7, 2025
2 checks passed
@ian-hoyle ian-hoyle deleted the TDRD-607-Fix-terraform-warnings branch January 7, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants